<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link id="themes" rel="stylesheet" type="text/css" href="core/themes/${themes==null?'default':themes}/easyui.css">
<link rel="stylesheet" type="text/css" href="core/themes/icon.css">
<link rel="stylesheet" href="core/kindeditor/themes/default/default.css" />

<script src="core/jquery-1.9.1.min.js" type="text/javascript"></script>
<script src="core/jquery.easyui.min.js" type="text/javascript"></script>
<script src="core/locale/easyui-lang-${pageContext.response.locale}.js" type="text/javascript"></script>
<script charset="utf-8" src="core/kindeditor/kindeditor-min.js"></script>
<script charset="utf-8" src="core/kindeditor/lang/${pageContext.response.locale}.js"></script>
<script>

function get(id){
	var obj = $('#'+id);
	if(obj.length==0){
		$('body').append('<div id="'+id+'"></div>');
		return $('#'+id);
	}else{
		return obj;
	}
}
function upload(path){
	var frameDocument = document.getElementById("uploadFrame").contentWindow.document;
	frameDocument.getElementById('uploadFile').click();
	//frameDocument.getElementById('uploadForm').submit();
}
function upload1(){
	$("#uploadFile").click();
    $("#uploadForm").submit();
}
function submit(){
    $("#uploadForm")[0].submit();
}
</script>
</head>
<body>
<input type="button" value="上传" onclick="upload('abc');">
<input type="button" value="上传1" onclick="upload1();">
<input type="button" value="提交" onclick="submit();">
<iframe id="uploadFrame" name="uploadFrame" src="upload.html" style="display:block;"></iframe>
<div id="uploadDiv" style="display:block;">
<form id='uploadForm' action='index.jsp' target='uploadFrame' method='post' enctype='multipart/form-data'>
	<input type="file" id="uploadFile" id="uploadFile">
</form>
</div>
<%
System.out.println(request.getMethod());
System.out.println(request.getContentType());
System.out.println("path:"+request.getParameter("path"));
System.out.println("file:"+request.getParameter("file"));
%>
</body>
</html>